<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.3"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>FabGL: scene.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">FabGL
   </div>
   <div id="projectbrief">ESP32 Display Controller and Graphics Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.3 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('scene_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle"><div class="title">scene.h</div></div>
</div><!--header-->
<div class="contents">
<a href="scene_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span><span class="comment">/*</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno">    2</span><span class="comment">  Created by Fabrizio Di Vittorio (fdivitto2013@gmail.com) - &lt;http://www.fabgl.com&gt;</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno">    3</span><span class="comment">  Copyright (c) 2019-2022 Fabrizio Di Vittorio.</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno">    4</span><span class="comment">  All rights reserved.</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno">    5</span><span class="comment"></span> </div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno">    6</span><span class="comment"></span> </div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno">    7</span><span class="comment">* Please contact fdivitto2013@gmail.com if you need a commercial license.</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno">    8</span><span class="comment"></span> </div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno">    9</span><span class="comment"></span> </div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno">   10</span><span class="comment">* This library and related software is available under GPL v3.</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno">   11</span><span class="comment"></span> </div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span><span class="comment">  FabGL is free software: you can redistribute it and/or modify</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno">   13</span><span class="comment">  it under the terms of the GNU General Public License as published by</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno">   14</span><span class="comment">  the Free Software Foundation, either version 3 of the License, or</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno">   15</span><span class="comment">  (at your option) any later version.</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno">   16</span><span class="comment"></span> </div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno">   17</span><span class="comment">  FabGL is distributed in the hope that it will be useful,</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno">   18</span><span class="comment">  but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno">   19</span><span class="comment">  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno">   20</span><span class="comment">  GNU General Public License for more details.</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno">   21</span><span class="comment"></span> </div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno">   22</span><span class="comment">  You should have received a copy of the GNU General Public License</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno">   23</span><span class="comment">  along with FabGL.  If not, see &lt;http://www.gnu.org/licenses/&gt;.</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno">   24</span><span class="comment"> */</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno">   25</span> </div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno">   26</span> </div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno">   27</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno">   28</span> </div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno">   29</span> </div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno">   30</span> </div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno">   38</span><span class="preprocessor">#include &quot;freertos/FreeRTOS.h&quot;</span></div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno">   39</span> </div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno">   40</span><span class="preprocessor">#include &quot;<a class="code" href="fabglconf_8h.html">fabglconf.h</a>&quot;</span></div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno">   41</span><span class="preprocessor">#include &quot;<a class="code" href="collisiondetector_8h.html">collisiondetector.h</a>&quot;</span></div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno">   42</span> </div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno">   43</span> </div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno">   44</span> </div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno">   45</span><span class="preprocessor">#define FABGL_DEFAULT_SCENETASK_STACKSIZE 2048</span></div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno">   46</span> </div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno">   47</span> </div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno">   48</span><span class="keyword">namespace </span>fabgl {</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno">   49</span> </div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno">   50</span> </div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno">   51</span> </div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"><a class="line" href="classfabgl_1_1_scene.html">   55</a></span><span class="keyword">class </span><a class="code hl_class" href="classfabgl_1_1_scene.html">Scene</a> {</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno">   56</span> </div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno">   57</span><span class="keyword">public</span>:</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno">   58</span> </div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno">   68</span>  <a class="code hl_function" href="classfabgl_1_1_scene_a10c9a1d4eb569fbd350776d1f61ad8ab.html#a10c9a1d4eb569fbd350776d1f61ad8ab">Scene</a>(<span class="keywordtype">int</span> maxSpritesCount, <span class="keywordtype">int</span> updateTimeMS, <span class="keywordtype">int</span> <a class="code hl_variable" href="displaycontroller_8h_a2474a5474cbff19523a51eb1de01cda4.html#a2474a5474cbff19523a51eb1de01cda4">width</a>, <span class="keywordtype">int</span> <a class="code hl_variable" href="displaycontroller_8h_ad12fc34ce789bce6c8a05d8a17138534.html#ad12fc34ce789bce6c8a05d8a17138534">height</a>, <span class="keywordtype">int</span> stackSize = FABGL_DEFAULT_SCENETASK_STACKSIZE);</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno">   69</span> </div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno">   70</span>  <span class="keyword">virtual</span> <a class="code hl_class" href="classfabgl_1_1_scene.html">~Scene</a>();</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno">   71</span> </div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"><a class="line" href="classfabgl_1_1_scene_a67a0997183f24da19b776d96c1052998.html#a67a0997183f24da19b776d96c1052998">   77</a></span>  <span class="keywordtype">int</span> <a class="code hl_function" href="classfabgl_1_1_scene_a67a0997183f24da19b776d96c1052998.html#a67a0997183f24da19b776d96c1052998">getWidth</a>()  { <span class="keywordflow">return</span> m_width; }</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno">   78</span> </div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"><a class="line" href="classfabgl_1_1_scene_a07efb2a4e9a982688c8bb3c3f21d1092.html#a07efb2a4e9a982688c8bb3c3f21d1092">   84</a></span>  <span class="keywordtype">int</span> <a class="code hl_function" href="classfabgl_1_1_scene_a07efb2a4e9a982688c8bb3c3f21d1092.html#a07efb2a4e9a982688c8bb3c3f21d1092">getHeight</a>() { <span class="keywordflow">return</span> m_height; }</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno">   85</span> </div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno">   99</span>  <span class="keywordtype">void</span> <a class="code hl_function" href="classfabgl_1_1_scene_ad7c67f44d6c720c52b1e538ab95aaa9d.html#ad7c67f44d6c720c52b1e538ab95aaa9d">start</a>(<span class="keywordtype">bool</span> suspendTask = <span class="keyword">true</span>);</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno">  100</span> </div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno">  104</span>  <span class="keywordtype">void</span> <a class="code hl_function" href="classfabgl_1_1_scene_a8c528baf37154d347366083f0f816846.html#a8c528baf37154d347366083f0f816846">stop</a>();</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno">  105</span> </div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"><a class="line" href="classfabgl_1_1_scene_ab5be7e5a13ea77d59aac45d21dceb6a0.html#ab5be7e5a13ea77d59aac45d21dceb6a0">  109</a></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classfabgl_1_1_scene_ab5be7e5a13ea77d59aac45d21dceb6a0.html#ab5be7e5a13ea77d59aac45d21dceb6a0">init</a>() = 0;</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno">  110</span> </div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"><a class="line" href="classfabgl_1_1_scene_ae1f037fffe3ee2f7b0ded5bcbadffae1.html#ae1f037fffe3ee2f7b0ded5bcbadffae1">  116</a></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classfabgl_1_1_scene_ae1f037fffe3ee2f7b0ded5bcbadffae1.html#ae1f037fffe3ee2f7b0ded5bcbadffae1">update</a>(<span class="keywordtype">int</span> updateCount) = 0;</div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno">  117</span> </div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"><a class="line" href="classfabgl_1_1_scene_a2278cb01916711b1d637ca375659b1ad.html#a2278cb01916711b1d637ca375659b1ad">  128</a></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classfabgl_1_1_scene_a2278cb01916711b1d637ca375659b1ad.html#a2278cb01916711b1d637ca375659b1ad">collisionDetected</a>(<a class="code hl_struct" href="structfabgl_1_1_sprite.html">Sprite</a> * spriteA, <a class="code hl_struct" href="structfabgl_1_1_sprite.html">Sprite</a> * spriteB, <a class="code hl_struct" href="structfabgl_1_1_point.html">Point</a> collisionPoint) = 0;</div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno">  129</span> </div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"><a class="line" href="classfabgl_1_1_scene_a48b03f63e22824a043e5df322ecebd3c.html#a48b03f63e22824a043e5df322ecebd3c">  138</a></span>  <span class="keywordtype">void</span> <a class="code hl_function" href="classfabgl_1_1_scene_a48b03f63e22824a043e5df322ecebd3c.html#a48b03f63e22824a043e5df322ecebd3c">addSprite</a>(<a class="code hl_struct" href="structfabgl_1_1_sprite.html">Sprite</a> * sprite)    { m_collisionDetector.<a class="code hl_function" href="classfabgl_1_1_collision_detector_a48b03f63e22824a043e5df322ecebd3c.html#a48b03f63e22824a043e5df322ecebd3c">addSprite</a>(sprite); }</div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno">  139</span> </div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"><a class="line" href="classfabgl_1_1_scene_aefc081299e5e20cd9b6d900de8559248.html#aefc081299e5e20cd9b6d900de8559248">  145</a></span>  <span class="keywordtype">void</span> <a class="code hl_function" href="classfabgl_1_1_scene_aefc081299e5e20cd9b6d900de8559248.html#aefc081299e5e20cd9b6d900de8559248">removeSprite</a>(<a class="code hl_struct" href="structfabgl_1_1_sprite.html">Sprite</a> * sprite) { m_collisionDetector.<a class="code hl_function" href="classfabgl_1_1_collision_detector_aefc081299e5e20cd9b6d900de8559248.html#aefc081299e5e20cd9b6d900de8559248">removeSprite</a>(sprite); }</div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno">  146</span> </div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"><a class="line" href="classfabgl_1_1_scene_a7e3cc34d6b070f957120fa1015e8cae5.html#a7e3cc34d6b070f957120fa1015e8cae5">  156</a></span>  <span class="keywordtype">void</span> <a class="code hl_function" href="classfabgl_1_1_scene_a7e3cc34d6b070f957120fa1015e8cae5.html#a7e3cc34d6b070f957120fa1015e8cae5">updateSprite</a>(<a class="code hl_struct" href="structfabgl_1_1_sprite.html">Sprite</a> * sprite) { m_collisionDetector.<a class="code hl_function" href="classfabgl_1_1_collision_detector_ad5da37881b02299b991afee3cd96bf57.html#ad5da37881b02299b991afee3cd96bf57">update</a>(sprite); }</div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno">  157</span> </div>
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno">  166</span>  <span class="keywordtype">void</span> <a class="code hl_function" href="classfabgl_1_1_scene_a61cfb64defe5bf06c623b25ecaeaf349.html#a61cfb64defe5bf06c623b25ecaeaf349">updateSpriteAndDetectCollisions</a>(<a class="code hl_struct" href="structfabgl_1_1_sprite.html">Sprite</a> * sprite);</div>
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno">  167</span> </div>
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno">  168</span><span class="keyword">private</span>:</div>
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno">  169</span> </div>
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno">  170</span>  <span class="keyword">static</span> <span class="keywordtype">void</span> updateTask(<span class="keywordtype">void</span> * pvParameters);</div>
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno">  171</span> </div>
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno">  172</span> </div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno">  173</span>  <span class="keywordtype">int</span>               m_width;</div>
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno">  174</span>  <span class="keywordtype">int</span>               m_height;</div>
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno">  175</span> </div>
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno">  176</span>  TaskHandle_t      m_updateTaskHandle;</div>
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno">  177</span>  <span class="keywordtype">int</span>               m_updateCount;</div>
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno">  178</span>  <span class="keywordtype">int</span>               m_updateTimeMS;</div>
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno">  179</span>  SemaphoreHandle_t m_mutex;</div>
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno">  180</span> </div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno">  181</span>  <a class="code hl_class" href="classfabgl_1_1_collision_detector.html">CollisionDetector</a> m_collisionDetector;</div>
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno">  182</span> </div>
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno">  183</span>  TaskHandle_t      m_suspendedTask;</div>
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno">  184</span> </div>
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno">  185</span>  <span class="keyword">volatile</span> <span class="keywordtype">bool</span>     m_running;</div>
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno">  186</span> </div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno">  187</span>};</div>
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno">  188</span> </div>
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno">  189</span> </div>
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno">  190</span> </div>
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno">  191</span> </div>
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno">  192</span> </div>
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno">  193</span>} <span class="comment">// end of namespace</span></div>
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno">  194</span> </div>
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno">  195</span> </div>
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno">  196</span> </div>
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno">  197</span> </div>
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno">  198</span> </div>
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno">  199</span> </div>
<div class="ttc" id="aclassfabgl_1_1_collision_detector_a48b03f63e22824a043e5df322ecebd3c_html_a48b03f63e22824a043e5df322ecebd3c"><div class="ttname"><a href="classfabgl_1_1_collision_detector_a48b03f63e22824a043e5df322ecebd3c.html#a48b03f63e22824a043e5df322ecebd3c">fabgl::CollisionDetector::addSprite</a></div><div class="ttdeci">void addSprite(Sprite *sprite)</div><div class="ttdoc">Adds the specified sprite to collision detector.</div><div class="ttdef"><b>Definition:</b> <a href="collisiondetector_8cpp_source.html#l00400">collisiondetector.cpp:400</a></div></div>
<div class="ttc" id="aclassfabgl_1_1_collision_detector_ad5da37881b02299b991afee3cd96bf57_html_ad5da37881b02299b991afee3cd96bf57"><div class="ttname"><a href="classfabgl_1_1_collision_detector_ad5da37881b02299b991afee3cd96bf57.html#ad5da37881b02299b991afee3cd96bf57">fabgl::CollisionDetector::update</a></div><div class="ttdeci">void update(Sprite *sprite)</div><div class="ttdoc">Updates collision detector.</div><div class="ttdef"><b>Definition:</b> <a href="collisiondetector_8cpp_source.html#l00449">collisiondetector.cpp:449</a></div></div>
<div class="ttc" id="aclassfabgl_1_1_collision_detector_aefc081299e5e20cd9b6d900de8559248_html_aefc081299e5e20cd9b6d900de8559248"><div class="ttname"><a href="classfabgl_1_1_collision_detector_aefc081299e5e20cd9b6d900de8559248.html#aefc081299e5e20cd9b6d900de8559248">fabgl::CollisionDetector::removeSprite</a></div><div class="ttdeci">void removeSprite(Sprite *sprite)</div><div class="ttdoc">Removes the specified sprite from collision detector.</div><div class="ttdef"><b>Definition:</b> <a href="collisiondetector_8cpp_source.html#l00415">collisiondetector.cpp:415</a></div></div>
<div class="ttc" id="aclassfabgl_1_1_collision_detector_html"><div class="ttname"><a href="classfabgl_1_1_collision_detector.html">fabgl::CollisionDetector</a></div><div class="ttdoc">A class to detect sprites collisions.</div><div class="ttdef"><b>Definition:</b> <a href="collisiondetector_8h_source.html#l00133">collisiondetector.h:133</a></div></div>
<div class="ttc" id="aclassfabgl_1_1_scene_a07efb2a4e9a982688c8bb3c3f21d1092_html_a07efb2a4e9a982688c8bb3c3f21d1092"><div class="ttname"><a href="classfabgl_1_1_scene_a07efb2a4e9a982688c8bb3c3f21d1092.html#a07efb2a4e9a982688c8bb3c3f21d1092">fabgl::Scene::getHeight</a></div><div class="ttdeci">int getHeight()</div><div class="ttdoc">Determines scene height.</div><div class="ttdef"><b>Definition:</b> <a href="scene_8h_source.html#l00084">scene.h:84</a></div></div>
<div class="ttc" id="aclassfabgl_1_1_scene_a10c9a1d4eb569fbd350776d1f61ad8ab_html_a10c9a1d4eb569fbd350776d1f61ad8ab"><div class="ttname"><a href="classfabgl_1_1_scene_a10c9a1d4eb569fbd350776d1f61ad8ab.html#a10c9a1d4eb569fbd350776d1f61ad8ab">fabgl::Scene::Scene</a></div><div class="ttdeci">Scene(int maxSpritesCount, int updateTimeMS, int width, int height, int stackSize=2048)</div><div class="ttdoc">The Scene constructor.</div><div class="ttdef"><b>Definition:</b> <a href="scene_8cpp_source.html#l00042">scene.cpp:42</a></div></div>
<div class="ttc" id="aclassfabgl_1_1_scene_a2278cb01916711b1d637ca375659b1ad_html_a2278cb01916711b1d637ca375659b1ad"><div class="ttname"><a href="classfabgl_1_1_scene_a2278cb01916711b1d637ca375659b1ad.html#a2278cb01916711b1d637ca375659b1ad">fabgl::Scene::collisionDetected</a></div><div class="ttdeci">virtual void collisionDetected(Sprite *spriteA, Sprite *spriteB, Point collisionPoint)=0</div><div class="ttdoc">This is an abstract method called whenever a collision has been detected.</div></div>
<div class="ttc" id="aclassfabgl_1_1_scene_a48b03f63e22824a043e5df322ecebd3c_html_a48b03f63e22824a043e5df322ecebd3c"><div class="ttname"><a href="classfabgl_1_1_scene_a48b03f63e22824a043e5df322ecebd3c.html#a48b03f63e22824a043e5df322ecebd3c">fabgl::Scene::addSprite</a></div><div class="ttdeci">void addSprite(Sprite *sprite)</div><div class="ttdoc">Adds the specified sprite to collision detector.</div><div class="ttdef"><b>Definition:</b> <a href="scene_8h_source.html#l00138">scene.h:138</a></div></div>
<div class="ttc" id="aclassfabgl_1_1_scene_a61cfb64defe5bf06c623b25ecaeaf349_html_a61cfb64defe5bf06c623b25ecaeaf349"><div class="ttname"><a href="classfabgl_1_1_scene_a61cfb64defe5bf06c623b25ecaeaf349.html#a61cfb64defe5bf06c623b25ecaeaf349">fabgl::Scene::updateSpriteAndDetectCollisions</a></div><div class="ttdeci">void updateSpriteAndDetectCollisions(Sprite *sprite)</div><div class="ttdoc">Updates collision detector and generate collision events.</div><div class="ttdef"><b>Definition:</b> <a href="scene_8cpp_source.html#l00129">scene.cpp:129</a></div></div>
<div class="ttc" id="aclassfabgl_1_1_scene_a67a0997183f24da19b776d96c1052998_html_a67a0997183f24da19b776d96c1052998"><div class="ttname"><a href="classfabgl_1_1_scene_a67a0997183f24da19b776d96c1052998.html#a67a0997183f24da19b776d96c1052998">fabgl::Scene::getWidth</a></div><div class="ttdeci">int getWidth()</div><div class="ttdoc">Determines scene width.</div><div class="ttdef"><b>Definition:</b> <a href="scene_8h_source.html#l00077">scene.h:77</a></div></div>
<div class="ttc" id="aclassfabgl_1_1_scene_a7e3cc34d6b070f957120fa1015e8cae5_html_a7e3cc34d6b070f957120fa1015e8cae5"><div class="ttname"><a href="classfabgl_1_1_scene_a7e3cc34d6b070f957120fa1015e8cae5.html#a7e3cc34d6b070f957120fa1015e8cae5">fabgl::Scene::updateSprite</a></div><div class="ttdeci">void updateSprite(Sprite *sprite)</div><div class="ttdoc">Updates collision detector.</div><div class="ttdef"><b>Definition:</b> <a href="scene_8h_source.html#l00156">scene.h:156</a></div></div>
<div class="ttc" id="aclassfabgl_1_1_scene_a8c528baf37154d347366083f0f816846_html_a8c528baf37154d347366083f0f816846"><div class="ttname"><a href="classfabgl_1_1_scene_a8c528baf37154d347366083f0f816846.html#a8c528baf37154d347366083f0f816846">fabgl::Scene::stop</a></div><div class="ttdeci">void stop()</div><div class="ttdoc">Stops scene updates and resumes suspended task.</div><div class="ttdef"><b>Definition:</b> <a href="scene_8cpp_source.html#l00081">scene.cpp:81</a></div></div>
<div class="ttc" id="aclassfabgl_1_1_scene_ab5be7e5a13ea77d59aac45d21dceb6a0_html_ab5be7e5a13ea77d59aac45d21dceb6a0"><div class="ttname"><a href="classfabgl_1_1_scene_ab5be7e5a13ea77d59aac45d21dceb6a0.html#ab5be7e5a13ea77d59aac45d21dceb6a0">fabgl::Scene::init</a></div><div class="ttdeci">virtual void init()=0</div><div class="ttdoc">This is an abstract method called when the scene needs to be initialized.</div></div>
<div class="ttc" id="aclassfabgl_1_1_scene_ad7c67f44d6c720c52b1e538ab95aaa9d_html_ad7c67f44d6c720c52b1e538ab95aaa9d"><div class="ttname"><a href="classfabgl_1_1_scene_ad7c67f44d6c720c52b1e538ab95aaa9d.html#ad7c67f44d6c720c52b1e538ab95aaa9d">fabgl::Scene::start</a></div><div class="ttdeci">void start(bool suspendTask=true)</div><div class="ttdoc">Starts scene updates and suspends current task.</div><div class="ttdef"><b>Definition:</b> <a href="scene_8cpp_source.html#l00065">scene.cpp:65</a></div></div>
<div class="ttc" id="aclassfabgl_1_1_scene_ae1f037fffe3ee2f7b0ded5bcbadffae1_html_ae1f037fffe3ee2f7b0ded5bcbadffae1"><div class="ttname"><a href="classfabgl_1_1_scene_ae1f037fffe3ee2f7b0ded5bcbadffae1.html#ae1f037fffe3ee2f7b0ded5bcbadffae1">fabgl::Scene::update</a></div><div class="ttdeci">virtual void update(int updateCount)=0</div><div class="ttdoc">This is an abstract method called whenever the scene needs to be updated.</div></div>
<div class="ttc" id="aclassfabgl_1_1_scene_aefc081299e5e20cd9b6d900de8559248_html_aefc081299e5e20cd9b6d900de8559248"><div class="ttname"><a href="classfabgl_1_1_scene_aefc081299e5e20cd9b6d900de8559248.html#aefc081299e5e20cd9b6d900de8559248">fabgl::Scene::removeSprite</a></div><div class="ttdeci">void removeSprite(Sprite *sprite)</div><div class="ttdoc">Removes the specified sprite from collision detector.</div><div class="ttdef"><b>Definition:</b> <a href="scene_8h_source.html#l00145">scene.h:145</a></div></div>
<div class="ttc" id="aclassfabgl_1_1_scene_html"><div class="ttname"><a href="classfabgl_1_1_scene.html">fabgl::Scene</a></div><div class="ttdoc">Scene is an abstract class useful to encapsulate functionalities of a scene (sprites,...</div><div class="ttdef"><b>Definition:</b> <a href="scene_8h_source.html#l00055">scene.h:55</a></div></div>
<div class="ttc" id="acollisiondetector_8h_html"><div class="ttname"><a href="collisiondetector_8h.html">collisiondetector.h</a></div><div class="ttdoc">This file contains fabgl::CollisionDetector class definition.</div></div>
<div class="ttc" id="adisplaycontroller_8h_a2474a5474cbff19523a51eb1de01cda4_html_a2474a5474cbff19523a51eb1de01cda4"><div class="ttname"><a href="displaycontroller_8h_a2474a5474cbff19523a51eb1de01cda4.html#a2474a5474cbff19523a51eb1de01cda4">width</a></div><div class="ttdeci">uint8_t width</div><div class="ttdef"><b>Definition:</b> <a href="displaycontroller_8h_source.html#l00002">displaycontroller.h:2</a></div></div>
<div class="ttc" id="adisplaycontroller_8h_ad12fc34ce789bce6c8a05d8a17138534_html_ad12fc34ce789bce6c8a05d8a17138534"><div class="ttname"><a href="displaycontroller_8h_ad12fc34ce789bce6c8a05d8a17138534.html#ad12fc34ce789bce6c8a05d8a17138534">height</a></div><div class="ttdeci">uint8_t height</div><div class="ttdef"><b>Definition:</b> <a href="displaycontroller_8h_source.html#l00003">displaycontroller.h:3</a></div></div>
<div class="ttc" id="afabglconf_8h_html"><div class="ttname"><a href="fabglconf_8h.html">fabglconf.h</a></div><div class="ttdoc">This file contains FabGL library configuration settings, like number of supported colors,...</div></div>
<div class="ttc" id="astructfabgl_1_1_point_html"><div class="ttname"><a href="structfabgl_1_1_point.html">fabgl::Point</a></div><div class="ttdoc">Represents the coordinate of a point.</div><div class="ttdef"><b>Definition:</b> <a href="fabutils_8h_source.html#l00239">fabutils.h:239</a></div></div>
<div class="ttc" id="astructfabgl_1_1_sprite_html"><div class="ttname"><a href="structfabgl_1_1_sprite.html">fabgl::Sprite</a></div><div class="ttdoc">Represents a sprite.</div><div class="ttdef"><b>Definition:</b> <a href="displaycontroller_8h_source.html#l00546">displaycontroller.h:546</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="scene_8h.html">scene.h</a></li>
    <li class="footer">Generated on Mon Aug 29 2022 13:52:05 for FabGL by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3 </li>
  </ul>
</div>
</body>
</html>
